package com.ruoyi.history.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 药物使用历史对象 history
 * 
 * @author ruoyi
 * @date 2025-04-12
 */
public class History extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    @Excel(name = "主键id")
    private Long id;

    /** 患者id */
    @Excel(name = "患者id")
    private Long patientId;

    /** 处方id */
    @Excel(name = "处方id")
    private Long prescriptionId;

    /** 用药时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "用药时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date usageDate;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setPatientId(Long patientId) 
    {
        this.patientId = patientId;
    }

    public Long getPatientId() 
    {
        return patientId;
    }
    public void setPrescriptionId(Long prescriptionId) 
    {
        this.prescriptionId = prescriptionId;
    }

    public Long getPrescriptionId() 
    {
        return prescriptionId;
    }
    public void setUsageDate(Date usageDate) 
    {
        this.usageDate = usageDate;
    }

    public Date getUsageDate() 
    {
        return usageDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("patientId", getPatientId())
            .append("prescriptionId", getPrescriptionId())
            .append("usageDate", getUsageDate())
            .toString();
    }
}
